# $Id$
# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: György Balló <ballogy@freestart.hu>

pkgname=gssdp
pkgver=1.0.2
pkgrel=1
pkgdesc="A GObject-based API for handling resource discovery and announcement over SSDP"
arch=(i686 x86_64)
url="http://gupnp.org/"
license=(LGPL)
depends=(libsoup)
makedepends=(gobject-introspection gtk3 gtk-doc vala autoconf-archive git)
optdepends=('gtk3: gssdp-device-sniffer')
_commit=3dd02bdef0663caf0d6749b555c9b2b2ff1934cb  # tags/gssdp-1.0.2^0
source=("git+https://git.gnome.org/browse/gssdp#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^gssdp-//;s/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
              --disable-static --enable-gtk-doc --enable-compile-warnings=minimum
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
